]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Fix manpage generation at dist time
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 25 May 2021 14:31:29 +0000 (16:31 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 25 May 2021 18:45:53 +0000 (18:45 +0000)
The AsciiDoc API only exposes the capabilities of asciidoc, but not
the related a2x tool. Fix generating the manpages by shelling out
to the command line tool instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4320

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1859>

meson/generate-manpages.py

index ce2ca282821a19dff0591d5f2029f1896116f8c8..e12df61b463a98552d3dab051658881fa175c1ec 100644 (file)
@@ -2,7 +2,7 @@
 
 import os
 from pathlib import PurePath
-from asciidocapi import AsciiDocAPI
+import subprocess
 
 man_pages = [
     'man/gnome-shell.1',
@@ -12,13 +12,12 @@ man_pages = [
 sourceroot = os.environ.get('MESON_SOURCE_ROOT')
 distroot = os.environ.get('MESON_DIST_ROOT')
 
-asciidoc = AsciiDocAPI()
-
 for man_page in man_pages:
     page_path = PurePath(man_page)
     src = PurePath(sourceroot, page_path.with_suffix('.txt'))
     dst = PurePath(distroot, page_path)
     stylesheet = src.with_name('stylesheet.xsl')
 
-    asciidoc.options('--xsl-file', os.fspath(stylesheet))
-    asciidoc.execute(os.fspath(src), outfile=os.fspath(dst))
+    subprocess.call(['a2x', '--xsl-file', os.fspath(stylesheet),
+      '--format', 'manpage', '--destination-dir', os.fspath(dst.parent),
+      os.fspath(src)])